<nz-spin *ngIf="isLoading" class="modal-spin"></nz-spin>
<form nz-form *ngIf="!isLoading" [formGroup]="validateForm" (ngSubmit)="submitForm()">
  <div nz-row [nzGutter]="24">
    <div nz-col [nzSpan]="24" class="role-rule">
      普通客户上传普通积分奖励规则
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="commonUserBigBoxCredit4">大盒</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['commonUserBigBoxCredit4']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="commonUserBigBoxCredit4" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('commonUserBigBoxCredit4').dirty && validateForm.get('commonUserBigBoxCredit4').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="commonUserSmallBoxCredit4">小盒</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['commonUserSmallBoxCredit4']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="commonUserSmallBoxCredit4" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('commonUserSmallBoxCredit4').dirty && validateForm.get('commonUserSmallBoxCredit4').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="commonUserBagCredit4">袋</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['commonUserBagCredit4']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="commonUserBagCredit4" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('commonUserBagCredit4').dirty && validateForm.get('commonUserBagCredit4').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
  </div>

  <div nz-row [nzGutter]="24">
    <div nz-col [nzSpan]="24" class="role-rule">
      促销员上传TAK积分奖励规则
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="promotionSalesBigBoxCredit5">大盒</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['promotionSalesBigBoxCredit5']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="promotionSalesBigBoxCredit5" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('promotionSalesBigBoxCredit5').dirty && validateForm.get('promotionSalesBigBoxCredit5').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="promotionSalesSmallBoxCredit5">小盒</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['promotionSalesSmallBoxCredit5']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="promotionSalesSmallBoxCredit5" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('promotionSalesSmallBoxCredit5').dirty && validateForm.get('promotionSalesSmallBoxCredit5').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="promotionSalesBagCredit5">袋</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['promotionSalesBagCredit5']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="promotionSalesBagCredit5" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('promotionSalesBagCredit5').dirty && validateForm.get('promotionSalesBagCredit5').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
  </div>

  <div nz-row [nzGutter]="24">
    <div nz-col [nzSpan]="24" class="role-rule">
      业务经理上传TAK积分奖励规则
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="areaUserBigBoxCredit3">大盒</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['areaUserBigBoxCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="areaUserBigBoxCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('areaUserBigBoxCredit3').dirty && validateForm.get('areaUserBigBoxCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="areaUserSmallBoxCredit3">小盒</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['areaUserSmallBoxCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="areaUserSmallBoxCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('areaUserSmallBoxCredit3').dirty && validateForm.get('areaUserSmallBoxCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="areaUserBagCredit3">袋</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['areaUserBagCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="areaUserBagCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('areaUserBagCredit3').dirty && validateForm.get('areaUserBagCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
  </div>

  <div nz-row [nzGutter]="24">
    <div nz-col [nzSpan]="24" class="role-rule">
      店长上传TAK积分奖励规则
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="shopkeeperBigBoxCredit1">大盒(店长)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['shopkeeperBigBoxCredit1']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="shopkeeperBigBoxCredit1" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('shopkeeperBigBoxCredit1').dirty && validateForm.get('shopkeeperBigBoxCredit1').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="shopkeeperSmallBoxCredit1">小盒(店长)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['shopkeeperSmallBoxCredit1']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="shopkeeperSmallBoxCredit1" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('shopkeeperSmallBoxCredit1').dirty && validateForm.get('shopkeeperSmallBoxCredit1').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="shopkeeperBagCredit1">袋(店长)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['shopkeeperBagCredit1']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="shopkeeperBagCredit1" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('shopkeeperBagCredit1').dirty && validateForm.get('shopkeeperBagCredit1').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="shopkeeperBigBoxCredit3">大盒(业务经理)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['shopkeeperBigBoxCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="shopkeeperBigBoxCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('shopkeeperBigBoxCredit3').dirty && validateForm.get('shopkeeperBigBoxCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="shopkeeperSmallBoxCredit3">小盒(业务经理)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['shopkeeperSmallBoxCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="shopkeeperSmallBoxCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('shopkeeperSmallBoxCredit3').dirty && validateForm.get('shopkeeperSmallBoxCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="shopkeeperBagCredit3">袋(业务经理)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['shopkeeperBagCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="shopkeeperBagCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('shopkeeperBagCredit3').dirty && validateForm.get('shopkeeperBagCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
  </div>


  <div nz-row [nzGutter]="24">
    <div nz-col [nzSpan]="24" class="role-rule">
      店员上传TAK积分奖励规则
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkBigBoxCredit2">大盒(店员)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkBigBoxCredit2']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkBigBoxCredit2" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkBigBoxCredit2').dirty && validateForm.get('salesclerkBigBoxCredit2').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkSmallBoxCredit2">小盒(店员)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkSmallBoxCredit2']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkSmallBoxCredit2" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkSmallBoxCredit2').dirty && validateForm.get('salesclerkSmallBoxCredit2').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkBagCredit2">袋(店员)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkBagCredit2']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkBagCredit2" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkBagCredit2').dirty && validateForm.get('salesclerkBagCredit2').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkBigBoxCredit1">大盒(店长)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkBigBoxCredit1']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkBigBoxCredit1" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkBigBoxCredit1').dirty && validateForm.get('salesclerkBigBoxCredit1').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkSmallBoxCredit1">小盒(店长)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkSmallBoxCredit1']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkSmallBoxCredit1" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkSmallBoxCredit1').dirty && validateForm.get('salesclerkSmallBoxCredit1').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkBagCredit1">袋(店长)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkBagCredit1']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkBagCredit1" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkBagCredit1').dirty && validateForm.get('salesclerkBagCredit1').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkBigBoxCredit3">大盒(业务经理)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkBigBoxCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.big" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkBigBoxCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkBigBoxCredit3').dirty && validateForm.get('salesclerkBigBoxCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkSmallBoxCredit3">小盒(业务经理)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkSmallBoxCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.small" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkSmallBoxCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkSmallBoxCredit3').dirty && validateForm.get('salesclerkSmallBoxCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="8">
      <nz-form-item nzFlex>
        <nz-form-label nzRequired nzFor="salesclerkBagCredit3">袋(业务经理)</nz-form-label>
        <nz-form-control [nzValidateStatus]="validateForm.controls['salesclerkBagCredit3']">
          <nz-input-number style="width: 100%;" [nzMin]="0" [nzMax]="maxCreditObj.bag" [nzStep]="1" [nzPrecision]="2"
                           formControlName="salesclerkBagCredit3" [nzPlaceHolder]="'奖励积分'"></nz-input-number>
          <nz-form-explain
            *ngIf="validateForm.get('salesclerkBagCredit3').dirty && validateForm.get('salesclerkBagCredit3').hasError('required')">
            请填写积分奖励
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </div>
  </div>


  <div class="modal-footer">
    <button nz-button type="button" (click)="close()">关闭</button>
    <!--<button nz-button type="submit" *ngIf="showType == 1" [nzType]="'primary'">保存</button>-->
  </div>
</form>
